package thread2;

public class Consumer extends Thread{
    Container container;

    public Consumer(Container container) {
        this.container = container;
    }

    public void run() {
        for (int i = 1; i < 100; i++) {
            System.out.println("消费了" + container.pop().id);
        }
    }

}
